package com.kulian.Signalling.system.mode.socket;

import lombok.Data;

/**
 * WebSocket信令消息
 */
@Data
public class SignalingMessage {
    /**
     * 消息类型
     */
    private String type;
    
    /**
     * 发送方用户ID
     */
    private String from;
    
    /**
     * 接收方用户ID
     */
    private String to;
    
    /**
     * 房间ID
     */
    private String roomId;
    
    /**
     * 消息内容
     */
    private Object data;
    
    /**
     * 时间戳
     */
    private long timestamp;

    public enum MessageType {
        // 房间相关
        CREATE_ROOM,
        JOIN_ROOM,
        LEAVE_ROOM,
        ROOM_INFO,
        
        // 呼叫相关
        CALL_REQUEST,
        CALL_ACCEPT,
        CALL_REJECT,
        RINGING,
        HANGUP,
        
        // 媒体相关
        OFFER,
        ANSWER,
        ICE_CANDIDATE,
        
        // 状态通知
        USER_JOINED,
        USER_LEFT
    }
}
